home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / updates / update16.zoo / gcc-2.0 / GMakefile < prev    next >
Encoding:
Makefile  |  1992-03-06  |  14.5 KB  |  397 lines

  1. # Makefile for GNU C++ CROSS compiler for the atariST/TT series hosted
  2. #  on a Sparc host (tested only on SunOS 4.0.3)
  3. #  NOTE: requires alloca.c from the emacs dist.
  4. #
  5.  
  6. # Makefile for GNU C compiler.
  7. #   Copyright (C) 1987 Free Software Foundation, Inc.
  8.  
  9. #This file is part of GNU CC.
  10.  
  11. #GNU CC is distributed in the hope that it will be useful,
  12. #but WITHOUT ANY WARRANTY.  No author or distributor
  13. #accepts responsibility to anyone for the consequences of using it
  14. #or for whether it serves any particular purpose or works at all,
  15. #unless he says so in writing.  Refer to the GNU CC General Public
  16. #License for full details.
  17.  
  18. #Everyone is granted permission to copy, modify and redistribute
  19. #GNU CC, but only under the conditions described in the
  20. #GNU CC General Public License.   A copy of this license is
  21. #supposed to have been given to you along with GNU CC so you
  22. #can know your rights and responsibilities.  It should be in a
  23. #file named COPYING.  Among other things, the copyright notice
  24. #and this notice must be preserved on all copies.
  25.  
  26. .NOEXPORT: # This tells GNU Make version 3
  27.        # not to put all the variables in the environment.
  28.  
  29. CROSSDIR = /net/acae127/home/bammi/atari/cross-gcc
  30. CROSSBIN = $(CROSSDIR)/bin
  31. CROSSLIB = $(CROSSDIR)/lib
  32. CROSSINC = $(CROSSDIR)/include
  33.  
  34. GCC_INCLUDE_DIR = $(CROSSINC)
  35. GPLUSPLUS_INCLUDE_DIR = $(CROSSDIR)/g++-inc
  36.  
  37. CFLAGS =  -O -DCROSSATARI=1 -Usun -I./config -I.
  38.  
  39. # host's cc
  40. CC = /bin/cc
  41.  
  42. # OLDCC should not be the GNU C compiler.
  43. BISON = bison
  44. BISONFLAGS =
  45. AR = ar
  46. SHELL = /bin/sh
  47.  
  48. bindir = $(CROSSBIN)
  49. libdir = $(CROSSLIB)
  50.  
  51. # Change this to a null string if obstacks are installed in the
  52. # system library.
  53. OBSTACK=obstack.o
  54.  
  55. # Dependency on obstack, alloca, malloc or whatever library facilities
  56. # are not installed in the system libraries.
  57. LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC)
  58.  
  59. # How to link with both our special library facilities
  60. # and the system's installed libraries.
  61. LIBS = $(OBSTACK) $(ALLOCA) $(MALLOC) $(MALLOC1) $(CLIB)
  62.  
  63. # Language-specific object files for C++.
  64. CPLUS_OBJS = cp-parse.o cp-decl.o cp-decl2.o \
  65.    cp-typeck.o cp-type2.o cp-tree.o cp-ptree.o \
  66.    cp-cvt.o cp-search.o cp-lex.o cp-gc.o cp-call.o \
  67.    cp-class.o cp-init.o cp-method.o cp-except.o \
  68.    cp-expr.o cp-pt.o cp-edsel.o cp-xref.o \
  69.    $(CPLUS_INPUT) cp-spew.o c-common.o
  70.  
  71. # Language-independent object files.
  72. OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
  73.  function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o \
  74.  rtl.o print-rtl.o rtlanal.o dbxout.o sdbout.o dwarfout.o emit-rtl.o \
  75.  integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
  76.  regclass.o local-alloc.o global-alloc.o reload.o reload1.o caller-save.o \
  77.  insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
  78.  insn-recog.o insn-extract.o insn-output.o insn-emit.o \
  79.  insn-attrtab.o aux-output.o
  80.  
  81. GCC_PASSES=gcc cc1 cpp
  82.  
  83. # Files to be copied away after each stage in building.
  84. STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \
  85.  insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
  86.  insn-attr.h insn-attrtab.c \
  87.  stamp-flags stamp-config stamp-codes \
  88.  stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
  89.  stamp-attr stamp-attrtab \
  90.  genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
  91.  genattrtab genattr \
  92.  $(GCC_PASSES) $(EXTRA_PARTS) gcc-cross cccp cc1plus cc1obj enquire \
  93.  protoize unprotoize specs collect2
  94.  
  95. # Header files that are made available to programs compiled with gcc.
  96. USER_H = stddef.h stdarg.h assert.h va-*.h limits.h
  97.  
  98. # If you want to recompile everything, just do rm *.o.
  99. # CONFIG_H = config.h tm.h
  100. CONFIG_H =
  101. RTL_H = rtl.h rtl.def machmode.h machmode.def
  102. TREE_H = tree.h real.h tree.def machmode.h machmode.def
  103. CPLUS_TREE_H = $(TREE_H) cp-tree.h cp-tree.def
  104.  
  105. ALL = cc1plus
  106.  
  107. all: $(ALL)
  108.  
  109. cc1plus: $(CPLUS_OBJS) $(OBJS) $(LIBDEPS)
  110.     $(CC) $(CFLAGS) $(LDFLAGS) -o cc1plus $(CPLUS_OBJS) $(OBJS) $(LIBS)
  111.  
  112. # C++ language specific files.
  113.  
  114. cp-parse.o : cp-parse.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  115.     $(CC) -c $(CFLAGS) cp-parse.c
  116.  
  117. cp-parse.c cp-parse.h : cp-parse.y
  118.     @echo expect 30 shift/reduce conflicts and 14 reduce/reduce conflicts
  119.     $(BISON) $(BISONFLAGS) -d -o cp-parse.c cp-parse.y
  120.  
  121. cp-spew.o : cp-spew.c $(CONFIG_H) $(CPLUS_TREE_H) \
  122.    cp-parse.h flags.h
  123. cp-lex.o : cp-lex.c $(CONFIG_H) $(CPLUS_TREE_H) \
  124.    cp-parse.h cp-input.c flags.h
  125. cp-decl.o : cp-decl.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
  126.   cp-lex.h cp-decl.h stack.h
  127. cp-decl2.o : cp-decl2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
  128.   cp-lex.h cp-decl.h
  129. cp-type2.o : cp-type2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  130. cp-typeck.o : cp-typeck.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  131. cp-class.o : cp-class.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h \
  132.     cp-class.h flags.h
  133. cp-call.o : cp-call.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h cp-class.h \
  134.     flags.h
  135. cp-init.o : cp-init.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  136. cp-method.o : cp-method.c $(CONFIG_H) $(CPLUS_TREE_H)
  137. cp-cvt.o : cp-cvt.c $(CONFIG_H) $(CPLUS_TREE_H)
  138. cp-search.o : cp-search.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
  139. cp-tree.o : cp-tree.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  140. cp-ptree.o : cp-ptree.c $(CONFIG_H) $(CPLUS_TREE_H)
  141. cp-gc.o : cp-gc.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  142. cp-except.o : cp-except.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  143. cp-expr.o : cp-expr.c $(CONFIG_H) $(CPLUS_TREE_H) $(RTL_H) flags.h \
  144.   expr.h insn-codes.h
  145. cp-edsel.o : cp-edsel.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
  146. cp-xref.o : cp-xref.c $(CONFIG_H) $(CPLUS_TREE_H)
  147. cp-pt.o : cp-pt.c $(CONFIG_H) $(CPLUS_TREE_H) cp-decl.h cp-parse.h
  148.  
  149. # A file used by all variants of C.
  150.  
  151. c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
  152.  
  153.  
  154. # Language-independent files.
  155. dumpvers: dumpvers.c
  156.  
  157. version.o: version.c
  158. obstack.o: obstack.c
  159.  
  160. tree.o : tree.c $(CONFIG_H) $(TREE_H) gvarargs.h flags.h function.h
  161. print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
  162. stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) function.h
  163. fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h 
  164. toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h input.h insn-attr.h
  165.  
  166. rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
  167.  
  168. print-rtl.o : print-rtl.c $(CONFIG_H) $(RTL_H)
  169. rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
  170.  
  171. varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h \
  172.    insn-codes.h expr.h hard-reg-set.h regs.h
  173. function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  174.    insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
  175.    recog.h output.h
  176. stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  177.    insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h loop.h recog.h
  178. expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) gvarargs.h flags.h function.h  \
  179.    insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h typeclass.h
  180. calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h \
  181.    insn-flags.h
  182. expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  183.    insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
  184. explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \
  185.    insn-config.h expr.h recog.h insn-flags.h insn-codes.h
  186. optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  187.    insn-flags.h insn-config.h insn-codes.h expr.h recog.h
  188. dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \
  189.    insn-config.h reload.h gstab.h
  190. sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) gsyms.h flags.h \
  191.    insn-config.h reload.h
  192. dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \
  193.    insn-config.h reload.h output.h
  194. emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) flags.h gvarargs.h function.h  \
  195.    regs.h insn-config.h insn-codes.h real.h expr.h
  196.  
  197. integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \
  198.    insn-flags.h insn-config.h insn-codes.h expr.h real.h function.h
  199.  
  200. jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
  201.    insn-config.h insn-flags.h insn-codes.h expr.h real.h
  202. stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
  203.  
  204. cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \
  205.    insn-config.h recog.h
  206. loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \
  207.    insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
  208. unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
  209.    integrate.h regs.h flags.h expr.h loop.h
  210. flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \
  211.    basic-block.h regs.h hard-reg-set.h output.h
  212. combine.o : combine.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h  \
  213.    insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
  214.    basic-block.h recog.h real.h
  215. regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
  216.    basic-block.h regs.h insn-config.h recog.h 
  217. local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h basic-block.h \
  218.    regs.h hard-reg-set.h insn-config.h recog.h output.h
  219. global-alloc.o : global-alloc.c $(CONFIG_H) $(RTL_H) flags.h  \
  220.    basic-block.h regs.h hard-reg-set.h insn-config.h output.h
  221.  
  222. reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h \
  223.    reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
  224. reload1.o : reload1.c $(CONFIG_H) $(RTL_H) flags.h expr.h \
  225.    reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
  226.    basic-block.h recog.h output.h
  227. caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
  228.    regs.h hard-reg-set.h insn-config.h basic-block.h recog.h reload.h expr.h
  229. reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \
  230.    basic-block.h regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
  231.    flags.h output.h
  232. sched.o : sched.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h \
  233.    flags.h insn-config.h insn-attr.h
  234. final.o : final.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h regs.h \
  235.    recog.h conditions.h insn-config.h insn-attr.h real.h output.h \
  236.    hard-reg-set.h insn-codes.h gstab.h
  237. recog.o : recog.c $(CONFIG_H) $(RTL_H)  \
  238.    regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
  239.    insn-flags.h insn-codes.h real.h
  240. reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
  241.    regs.h hard-reg-set.h flags.h insn-config.h
  242.    
  243. aux-output.o : aux-output.c $(CONFIG_H) \
  244.    $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
  245.    insn-flags.h output.h insn-attr.h insn-codes.h
  246.  
  247.  
  248. .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
  249.   insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
  250.   insn-attr.h insn-attrtab.c
  251.  
  252. insn-config.h : md genconfig
  253.     ./genconfig md > tmp-insn-config.h
  254.     ./move-if-change tmp-insn-config.h insn-config.h
  255.  
  256. insn-flags.h : md genflags
  257.     ./genflags md > tmp-insn-flags.h
  258.     ./move-if-change tmp-insn-flags.h insn-flags.h
  259.  
  260. insn-codes.h : md gencodes
  261.     ./gencodes md > tmp-insn-codes.h
  262.     ./move-if-change tmp-insn-codes.h insn-codes.h
  263.  
  264. insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h insn-config.h
  265.     $(CC) $(CFLAGS) -c insn-emit.c
  266.  
  267. insn-emit.c : md genemit
  268.     ./genemit md > tmp-insn-emit.c
  269.     ./move-if-change tmp-insn-emit.c insn-emit.c
  270.  
  271. insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h
  272.     $(CC) $(CFLAGS) -c insn-recog.c
  273.  
  274. insn-recog.c : md genrecog
  275.     ./genrecog md > tmp-insn-recog.c
  276.     ./move-if-change tmp-insn-recog.c insn-recog.c
  277.  
  278. insn-extract.o : insn-extract.c $(RTL_H)
  279.     $(CC) $(CFLAGS) -c insn-extract.c
  280.  
  281. insn-extract.c : md genextract
  282.     ./genextract md > tmp-insn-extract.c
  283.     ./move-if-change tmp-insn-extract.c insn-extract.c
  284.  
  285. insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h
  286.     $(CC) $(CFLAGS) -c insn-peep.c
  287.  
  288. insn-peep.c : md genpeep
  289.     ./genpeep md > tmp-insn-peep.c
  290.     ./move-if-change tmp-insn-peep.c insn-peep.c
  291.  
  292. insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h insn-config.h insn-flags.h conditions.h output.h aux-output.c
  293.     $(CC) $(CFLAGS) -c insn-output.c
  294.  
  295. insn-output.c : md genoutput
  296.     ./genoutput md > tmp-insn-output.c
  297.     ./move-if-change tmp-insn-output.c insn-output.c
  298.  
  299. insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \
  300.      insn-attr.h insn-config.h
  301.     $(CC) $(CFLAGS) -c insn-attrtab.c
  302.  
  303. insn-attr.h: md genattr
  304.     ./genattr md > tmp-attr.h
  305.     ./move-if-change tmp-attr.h insn-attr.h
  306.  
  307. insn-attrtab.c: md genattrtab
  308.     ./genattrtab md > tmp-attrtab.c
  309.     ./move-if-change tmp-attrtab.c insn-attrtab.c
  310.  
  311. # Now the programs that generate those files.
  312.  
  313. genconfig : genconfig.o rtl.o $(LIBDEPS)
  314.     $(CC) $(CFLAGS) $(LDFLAGS) -o genconfig genconfig.o rtl.o $(LIBS)
  315.  
  316. genconfig.o : genconfig.c $(RTL_H)
  317.     $(CC) $(CFLAGS) -c genconfig.c
  318.  
  319. genflags : genflags.o rtl.o $(LIBDEPS)
  320.     $(CC) $(CFLAGS) $(LDFLAGS) -o genflags genflags.o rtl.o $(LIBS)
  321.  
  322. genflags.o : genflags.c $(RTL_H)
  323.     $(CC) $(CFLAGS) -c genflags.c
  324.  
  325. gencodes : gencodes.o rtl.o $(LIBDEPS)
  326.     $(CC) $(CFLAGS) $(LDFLAGS) -o gencodes gencodes.o rtl.o $(LIBS)
  327.  
  328. gencodes.o : gencodes.c $(RTL_H)
  329.     $(CC) $(CFLAGS) -c gencodes.c
  330.  
  331. genemit : genemit.o rtl.o $(LIBDEPS)
  332.     $(CC) $(CFLAGS) $(LDFLAGS) -o genemit genemit.o rtl.o $(LIBS)
  333.  
  334. genemit.o : genemit.c $(RTL_H)
  335.     $(CC) $(CFLAGS) -c genemit.c
  336.  
  337. genrecog : genrecog.o rtl.o $(LIBDEPS)
  338.     $(CC) $(CFLAGS) $(LDFLAGS) -o genrecog genrecog.o rtl.o $(LIBS)
  339.  
  340. genrecog.o : genrecog.c $(RTL_H)
  341.     $(CC) $(CFLAGS) -c genrecog.c
  342.  
  343. genextract : genextract.o rtl.o $(LIBDEPS)
  344.     $(CC) $(CFLAGS) $(LDFLAGS) -o genextract genextract.o rtl.o $(LIBS)
  345.  
  346. genextract.o : genextract.c $(RTL_H)
  347.     $(CC) $(CFLAGS) -c genextract.c
  348.  
  349. genpeep : genpeep.o rtl.o $(LIBDEPS)
  350.     $(CC) $(CFLAGS) $(LDFLAGS) -o genpeep genpeep.o rtl.o $(LIBS)
  351.  
  352. genpeep.o : genpeep.c $(RTL_H)
  353.     $(CC) $(CFLAGS) -c genpeep.c
  354.  
  355. genoutput : genoutput.o rtl.o $(LIBDEPS)
  356.     $(CC) $(CFLAGS) $(LDFLAGS) -o genoutput genoutput.o rtl.o $(LIBS)
  357.  
  358. genoutput.o : genoutput.c $(RTL_H)
  359.     $(CC) $(CFLAGS) -c genoutput.c
  360.  
  361. genattr : genattr.o rtl.o $(LIBDEPS)
  362.     $(CC) $(CFLAGS) $(LDFLAGS) -o genattr \
  363.      genattr.o rtl.o $(LIBS)
  364.  
  365. genattr.o : genattr.c $(RTL_H) config.h
  366.     $(CC) -c $(CFLAGS) genattr.c
  367.  
  368. genattrtab : genattrtab.o rtl.o rtlanal.o $(LIBDEPS)
  369.     $(CC) $(CFLAGS) $(LDFLAGS) -o genattrtab \
  370.      genattrtab.o rtl.o rtlanal.o $(LIBS)
  371.  
  372. genattrtab.o : genattrtab.c $(RTL_H) config.h insn-config.h
  373.     $(CC) -c $(CFLAGS) genattrtab.c
  374.  
  375. # gnulib is not deleted because deleting it would be inconvenient
  376. # for most uses of this target.
  377. clean:
  378.     -rm -f *.o *.oo $(STAGESTUFF)
  379.     -rm -f *.s *.s[0-9] *.co *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
  380.     -rm -f core
  381.  
  382. # Get rid of every file that's generated from some other file (except INSTALL).
  383. realclean: clean
  384.     -rm -f $(ALL)
  385.     -rm -f cpp.aux cpp.cps cpp.fns cpp.info cpp.kys cpp.pgs cpp.tps cpp.vrs
  386.     -rm -f errs gnulib TAGS 
  387.     -rm -f core report
  388.     -rm -f internals internals-* internals.?? internals.??s
  389.  
  390. # Copy the files into directories where they will be run.
  391. install: all
  392.     cp cc1plus $(libdir)/gcc-cc1plus
  393.  
  394. force:
  395. #In GNU Make, ignore whether `stage*' exists.
  396. .PHONY: clean realclean
  397.